{% extends "simple_cfp/cfp_base.html" %}
{% load i18n %}
{% block content %}
<div id="content-main">
    <style type="text/css">
        .cfp_form_error { color: #FF0000; font-weight: bold }
    </style>

    <p>
    Please fill out this form to submit a presentation. You need to have a
    speaker validation code. If you do not,
    <a href="../speaker_registration/">click here to register as a speaker</a>.
    </p>

    <p>
    The fields in <b>bold</b> are required.
    </p>

    <form method="post" action="." enctype="multipart/form-data">
    <table>
    {% if form.contact_email.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.contact_email.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_contact_email"><b>Contact Email:</b></label></td>
        <td>{{ form.contact_email }}</td>
    </tr>
    {% if form.speaker_email.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.speaker_email.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_speaker_email"><b>Speaker Email:</b></label></td>
        <td>{{ form.speaker_email }}</td>
    </tr>
    {% if form.speaker_code.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.speaker_code.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_speaker_code"><b>Speaker Code:</b></label></td>
        <td>{{ form.speaker_code }}</td>
    </tr>
    {% if form.categories.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.categories.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_categories"><b>Categories:</b></label>
        <p>(Hold down control / command to select more than one)</p>
        </td>
        <td>{{ form.categories }}</td>
    </tr>
    {% if form.audiences.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.audiences.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_audiences"><b>Audiences:</b></label>
        <p>(Hold down control / command to select more than one)</p>
        </td>
        <td>{{ form.audiences }}</td>
    </tr>
    {% if form.title.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.title.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_title"><b>Presentation Title:</b></label></td>
        <td>{{ form.title }}</td>
    </tr>
    {% if form.description.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.description.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_description"><b>Brief Description:</b></label>
        (up to 255 characters)
        </td>
        <td>{{ form.description }}</td>
    </tr>
    {% if form.short_abstract.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.short_abstract.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td valign="top"><label for="id_short_abstract"><b>Short Abstract:</b></label>
        <p>(up to 1000 characters)</p>
        </td>
        <td>{{ form.short_abstract }}</td>
    </tr>
    {% if form.long_abstract.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.long_abstract.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td valign="top"><label for="id_long_abstract">Long Abstract:</label>
        <p>(up to 10000 characters)</p>
        </td>
        <td>{{ form.long_abstract }}</td>
    </tr>
    {% if upload %}
    {% if form.file.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.file.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_file">Presentation to upload:</label>
        <p>Up to {{ file_limit|filesizeformat }}.</p>
        </td>
        <td valign="top">{{ form.file }}</td>
    </tr>
    {% endif %}
    {% if form.additional_speakers.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.additional_speakers.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_additional_speakers">Additional Speakers:</label>
        <p>Speaker email addresses, separated by commas</p>
        </td>
        <td valign="top">{{ form.additional_speakers }}</td>
    </tr>
    {% if form.msg.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.msg.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_msg">Message to the reviewers:</label></td>
        <td>{{ form.msg }}</td>
    </tr>
    </table>

    {% if recaptcha_html %}
        {% autoescape off %}
            {{ recaptcha_html }}
        {% endautoescape %}
    {% endif %}

    <p>
    <input type="submit" value="Submit Presentation" />
    </p>
    </form>
</div>
{% endblock %}
